package com.evil.common.log.enums.base;

import com.evil.common.core.enums.RCodeEnum;
import com.evil.common.core.exception.BusinessException;

/**
 * 操作日志类型
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
public interface LogType {

    int getType();

    String getName();

    Class<?> getEntityClass();

    static BusinessException error(Class<?> entityClass) {
        return new BusinessException(RCodeEnum.ERROR_RUNTIME, String.format("无[%s]操作日志类型", entityClass.getSimpleName()));
    }
}
